Optimal. Leaf size=74 \[ a x+\frac {b \sqrt {\frac {\pi }{2}} \cos (c) S\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right )}{\sqrt {d}}+\frac {b \sqrt {\frac {\pi }{2}} C\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right ) \sin (c)}{\sqrt {d}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3434, 3433,
3432} \begin {gather*} a x+\frac {\sqrt {\frac {\pi }{2}} b \sin (c) \text {FresnelC}\left (\sqrt {\frac {2}{\pi }} \sqrt {d} x\right )}{\sqrt {d}}+\frac {\sqrt {\frac {\pi }{2}} b \cos (c) S\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right )}{\sqrt {d}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3432
Rule 3433
Rule 3434
Rubi steps
\begin {align*} \int \left (a+b \sin \left (c+d x^2\right )\right ) \, dx &=a x+b \int \sin \left (c+d x^2\right ) \, dx\\ &=a x+(b \cos (c)) \int \sin \left (d x^2\right ) \, dx+(b \sin (c)) \int \cos \left (d x^2\right ) \, dx\\ &=a x+\frac {b \sqrt {\frac {\pi }{2}} \cos (c) S\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right )}{\sqrt {d}}+\frac {b \sqrt {\frac {\pi }{2}} C\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right ) \sin (c)}{\sqrt {d}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 61, normalized size = 0.82 \begin {gather*} a x+\frac {b \sqrt {\frac {\pi }{2}} \left (\cos (c) S\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right )+C\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right ) \sin (c)\right )}{\sqrt {d}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 48, normalized size = 0.65
method | result | size |
default | \(a x +\frac {b \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (c \right ) \mathrm {S}\left (\frac {x \sqrt {d}\, \sqrt {2}}{\sqrt {\pi }}\right )+\sin \left (c \right ) \FresnelC \left (\frac {x \sqrt {d}\, \sqrt {2}}{\sqrt {\pi }}\right )\right )}{2 \sqrt {d}}\) | \(48\) |
risch | \(a x +\frac {i b \,{\mathrm e}^{-i c} \sqrt {\pi }\, \erf \left (\sqrt {i d}\, x \right )}{4 \sqrt {i d}}-\frac {i b \,{\mathrm e}^{i c} \sqrt {\pi }\, \erf \left (\sqrt {-i d}\, x \right )}{4 \sqrt {-i d}}\) | \(59\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.30, size = 53, normalized size = 0.72 \begin {gather*} -\frac {\sqrt {2} \sqrt {\pi } {\left ({\left (-\left (i + 1\right ) \, \cos \left (c\right ) + \left (i - 1\right ) \, \sin \left (c\right )\right )} \operatorname {erf}\left (\sqrt {i \, d} x\right ) + {\left (\left (i - 1\right ) \, \cos \left (c\right ) - \left (i + 1\right ) \, \sin \left (c\right )\right )} \operatorname {erf}\left (\sqrt {-i \, d} x\right )\right )} b}{8 \, \sqrt {d}} + a x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 67, normalized size = 0.91 \begin {gather*} \frac {\sqrt {2} \pi b \sqrt {\frac {d}{\pi }} \cos \left (c\right ) \operatorname {S}\left (\sqrt {2} x \sqrt {\frac {d}{\pi }}\right ) + \sqrt {2} \pi b \sqrt {\frac {d}{\pi }} \operatorname {C}\left (\sqrt {2} x \sqrt {\frac {d}{\pi }}\right ) \sin \left (c\right ) + 2 \, a d x}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.25, size = 66, normalized size = 0.89 \begin {gather*} a x + \frac {\sqrt {2} \sqrt {\pi } b \left (\sin {\left (c \right )} C\left (\frac {\sqrt {2} \sqrt {d} x}{\sqrt {\pi }}\right ) + \cos {\left (c \right )} S\left (\frac {\sqrt {2} \sqrt {d} x}{\sqrt {\pi }}\right )\right ) \sqrt {\frac {1}{d}}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 5.29, size = 102, normalized size = 1.38 \begin {gather*} -\frac {1}{4} \, {\left (-\frac {i \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {2} x {\left (-\frac {i \, d}{{\left | d \right |}} + 1\right )} \sqrt {{\left | d \right |}}\right ) e^{\left (i \, c\right )}}{{\left (-\frac {i \, d}{{\left | d \right |}} + 1\right )} \sqrt {{\left | d \right |}}} + \frac {i \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {2} x {\left (\frac {i \, d}{{\left | d \right |}} + 1\right )} \sqrt {{\left | d \right |}}\right ) e^{\left (-i \, c\right )}}{{\left (\frac {i \, d}{{\left | d \right |}} + 1\right )} \sqrt {{\left | d \right |}}}\right )} b + a x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.75, size = 56, normalized size = 0.76 \begin {gather*} a\,x+\frac {\sqrt {2}\,b\,\sqrt {\pi }\,\mathrm {S}\left (\frac {\sqrt {2}\,\sqrt {d}\,x}{\sqrt {\pi }}\right )\,\cos \left (c\right )}{2\,\sqrt {d}}+\frac {\sqrt {2}\,b\,\sqrt {\pi }\,\mathrm {C}\left (\frac {\sqrt {2}\,\sqrt {d}\,x}{\sqrt {\pi }}\right )\,\sin \left (c\right )}{2\,\sqrt {d}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________